// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_SUPPLIER_ATTACHED
// * CreateDate    : 2011/11/17 14:52:47
// * Creater       : CodeSmith
// * LastChangeDate: 2011/11/17 14:52:47
// * LastChanger   : 2011/11/17 14:52:47
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
	[Serializable]
	public partial class MstSupplierAttachedEntity : EntityBase
    {
        public MstSupplierAttachedTable TableSchema
        {
            get
            {
                return MstSupplierAttachedTable.Current;
            }
		}
		
		public MstSupplierAttachedEntity()
        {

        }
		
		public MstSupplierAttachedEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.AttachedType = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_TYPE"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
			this.ExpiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRED_DATE"]));
        }
		
		public MstSupplierAttachedEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.AttachedId = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_ID"]));
			this.SupplierId = Convert.ToString(CommonFunctions.ToObject(dr["SUPPLIER_ID"]));
			this.AttachedType = Convert.ToString(CommonFunctions.ToObject(dr["ATTACHED_TYPE"]));
			this.FileName = Convert.ToString(CommonFunctions.ToObject(dr["FILE_NAME"]));
			this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
			this.UploadBy = Convert.ToString(CommonFunctions.ToObject(dr["UPLOAD_BY"]));
			this.UploadDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["UPLOAD_DATE"]));
			this.ExpiredDate = Convert.ToDateTime(CommonFunctions.ToObject(dr["EXPIRED_DATE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstSupplierAttachedTable.Current;
            }
        }
		
		#region Perporty List
        public string AttachedId
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_ATTACHED_ID)); }
            set { SetData(MstSupplierAttachedTable.C_ATTACHED_ID, value); }
        }
		
        public string SupplierId
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_SUPPLIER_ID)); }
            set { SetData(MstSupplierAttachedTable.C_SUPPLIER_ID, value); }
        }
		
        public string AttachedType
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_ATTACHED_TYPE)); }
            set { SetData(MstSupplierAttachedTable.C_ATTACHED_TYPE, value); }
        }
		
        public string FileName
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_FILE_NAME)); }
            set { SetData(MstSupplierAttachedTable.C_FILE_NAME, value); }
        }
		
        public string Remark
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_REMARK)); }
            set { SetData(MstSupplierAttachedTable.C_REMARK, value); }
        }
		
        public string UploadBy
        {
            get { return Convert.ToString(GetData(MstSupplierAttachedTable.C_UPLOAD_BY)); }
            set { SetData(MstSupplierAttachedTable.C_UPLOAD_BY, value); }
        }
		
        public DateTime UploadDate
        {
            get { return Convert.ToDateTime(GetData(MstSupplierAttachedTable.C_UPLOAD_DATE)); }
            set { SetData(MstSupplierAttachedTable.C_UPLOAD_DATE, value); }
        }
		
        public DateTime ExpiredDate
        {
            get { return Convert.ToDateTime(GetData(MstSupplierAttachedTable.C_EXPIRED_DATE)); }
            set { SetData(MstSupplierAttachedTable.C_EXPIRED_DATE, value); }
        }
		
		#endregion
	}
	
	
}	

